Skip to content

Conversation

@danielztolnai
Copy link

Fixes #9385 .

Description of the problem being solved:

Spell suppression is used for ailment avoidance calculation in doActorMisc() when SpellSuppressionAppliesToAilmentAvoidance. However, spell suppression from the evasion mastery +15% chance to Suppress Spell Damage if Equipped Helmet, Body Armour, Gloves, and Boots all have Evasion Rating was only calculated in a later step, at the beginning of calcs.defence(). This lead to incorrect results.

To fix in the safest way possible, I moved the execution of as minimal code as possible as little as possible. I moved code from calcs.defence() to a separate function that is called right before the doActorMisc() step.

If this is not the correct way to address this, let me know and I will change my implementation.

Steps taken to verify a working solution:

  • With the same setup as in the issue, the ailment value is now correct while it was not before.
  • Checked the values while running the code via inspection: Now the spell suppression value in the modDB is correct right before the ailment avoidance calculation step, while it wasn't before.
  • I also checked whether the modified functions are called anywhere else to see if more changes are needed.

Link to a build that showcases this PR:

https://pobb.in/mLdCGe4ojsq-

Before and after screenshots:

You can see that the ailments are wrongly applied before the change, but not applied after.

image image

…culations

A few conditionals in the misc calculation use these, for example the ailment
calculation via spell suppression via the evasion mastery that grants
suppression based on evasion on items.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Arkhon's tools, Ancestral Vision and added spell suppression Evasion Mastery leads to incorrect ailment status

1 participant